<?php
class Newpassw_Form extends TdPage {
	
	
	public $formrecover;
	
	function __construct($template) {
		parent::__construct("", $template);
		$this->doInit();
	}
	
	
	function doInit() {
		$this->createform();
	}
	
	
	function createform() {
		
		global $webroot;
	  	
	  	$this->formrecover = new TdForm("formrecover", "../core/app/form/form.phtml");
		$this->formrecover->setName("formrecover");
		$this->formrecover->setMethod("POST");
		$this->formrecover->setAction($webroot."/recover.htm");			
		
		$hidden_new_passw = new TdHiddenField("hidden_new_passw", "../core/app/form/hiddenfield.phtml");
		$hidden_new_passw->setValue("formrecover");
		$hidden_new_passw->setName("hidden_new_passw");
		$this->formrecover->addField($hidden_new_passw);
		
		
		$new_passwcode = new TdHtmlCode("new_passwcode1", "../core/app/form/htmlcode.phtml");
		$code1 = "<p class=\"login_text\">Please digit new password"."</p>";
		$new_passwcode->setValue($code1);
		$this->formrecover->addField($new_passwcode);
		
		$l_password = new TdLabel("label_password", "../core/app/form/label.phtml");
		$l_password->setClass("label_signup");
		$l_password->setValue("Password");
		
		$password = new TdPasswordField("password", "../core/app/form/passwfield.phtml");
		$password->setRequired(true);
		$password->setValue("");
		$password->setLabel($l_password);
		$password->setName("password");
		$password->setSize("13");
		$password->setClass("input_login");			
		$this->formrecover->addField($password);
		
		$l_password_conf = new TdLabel("label_password_conf", "../core/app/form/label.phtml");
		$l_password_conf->setClass("label_signup");
		$l_password_conf->setValue("Confirm Password");
		
		$password_conf = new TdPasswordField("password_conf", "../core/app/form/passwfield.phtml");
		$password_conf->setRequired(true);
		$password_conf->setLabel($l_password_conf);
		$password_conf->setValue("");
		$password_conf->setName("password_conf");
		$password_conf->setSize("13");
		$password_conf->setClass("input_login");
		$this->formrecover->addField($password_conf);
		
		
		$submit = new TdSubmitField("submit_login", "../core/app/form/submit.phtml");
		$submit->setValue("");
		$submit->setName("login");
		$submit->setClass("button_login");
		$this->formrecover->addField($submit);
		
		$this->addComponent($this->formrecover);	
	  	
	  	
	  }
	  
	  
	function doValidate() {
	
		if (!$this->formrecover->gotError()) {
			
			// TODO	  		
	  		
	  	}
			
	}
	  	 
	
	
}
?>